<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>读取并修改文件的扩展名 / 选择目录并查看文件信息列表</title>

    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
    <style>
        #div1 {width: 520px;height: 300px;margin: auto; border: 2px solid red; }
        #div2 {width: 520px;height: 300px;margin: auto; border: 2px solid red; background-color: gray;}
        p{text-align: center}
    </style>
</head>
<body>
    <div id="div1">
        <form action="index.php" method="post" id="myform">
            <div class="form-group">
                <label for="exampleInputFile">File input</label>
                <input type="file" id="exampleInputFile">
            </div>
            <label>输入新的文件名</label><input type="text" name="name"><br />
            <input type="submit" value="Rename" class="btn" ><br />
            <p>注意：文件名需要带有扩展名</p>
        </form>
    </div>
    <div id="div2">
        <form method="post" action="index3.php">
            <p>输入目录路径 查看文件以及文件夹信息</p>
            <input type="text" name="path">
            <input type="submit" value="查看">
        </form>
    </div>
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</body>
</html>